package com.ihg.hiex.admin.dao.session;

import java.util.List;

import com.demo2do.core.persistence.annotation.Dao;
import com.demo2do.core.persistence.annotation.Query;
import com.demo2do.core.persistence.annotation.Variable;
import com.ihg.hiex.entity.session.Session;
import com.ihg.hiex.entity.session.participator.SessionParticipatorRecord;

/**
 *
 * @author Ark
 *
 */
@Dao("hibernate")
public interface SessionParticipatorRecordDao {
    
    /**
     * @param session
     * @return
     */
    @Query("FROM SessionParticipatorRecord WHERE disabled = false AND session = :session")
    public List<SessionParticipatorRecord> list(@Variable("session") Session session);

    /**
     * @param session
     * @param delegateId
     * @return
     */
    @Query("FROM SessionParticipatorRecord WHERE disabled = false AND session = :session AND delegateId = :delegateId")
    public SessionParticipatorRecord load(@Variable("session") Session session, @Variable("delegateId") Long delegateId);
    
}
